package com.dc.pay.mapper;

import com.dc.pay.mapper.entity.PaymentChannelEntity;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: KEYD
 * @Date: 2020/1/11 21:29
 * @Desc: 查询支付渠道的数据库信息
 */
public interface PaymentChannelMapper {

    /**
     * CHANNEL_STATE 0 开启  1 关闭。
     *
     * @return
     */
    @Select("SELECT channel_Name  AS channelName , channel_Id AS channelId, merchant_Id AS merchantId,sync_Url AS syncUrl, asyn_Url AS asynUrl,public_Key AS publicKey, private_Key AS privateKey,channel_State AS channelState ,class_ADDRES as classAddres  FROM payment_channel WHERE CHANNEL_STATE='0';")
    public List<PaymentChannelEntity> selectAll();

    @Select("SELECT channel_Name  AS channelName , channel_Id AS channelId, merchant_Id AS merchantId,sync_Url AS syncUrl, asyn_Url AS asynUrl,public_Key AS publicKey, private_Key AS privateKey,channel_State AS channelState ,class_ADDRES as classAddres  FROM payment_channel WHERE CHANNEL_STATE='0' AND channel_id=#{channelId};")
    PaymentChannelEntity selectBychannelId(String channelId);


}

















